#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
int compare(const void* a, const void* b)
{
	return *(int*)a - *(int*)b;
}
int b[100];

int main()
{
	int t, n, k, i, count = 0;
	scanf("%d", &t);
	for (;t > 0;t--)
	{
		int n;
		scanf("%d %d", &n, &k);
		int a[5] = { 0 };
		for (i = 0;i < n;i++)
		{
			int tmp = 0;
			scanf("%d", &tmp);
			if (b[tmp] == 0)
			{
				a[i] = tmp;
			}
			else
			{
				b[tmp]++;
			}
		}
		qsort(a, n, sizeof(int), compare);
		i = 0;
		while (i <= k - 1)
		{
			if (n >= k)
			{
				if (a[i] == i + 1)
					count++;
				else
					count = 0;
			}
			i++;
		}
		if (n < k || count != k)
			printf("no\n");
		else if (count == k)
			printf("yes\n");
	}
	return 0;
}